import java.util.Scanner;


public class ReverseStr 
{
	public static void main(String[] args)
	{		
		Scanner s = new Scanner(System.in);
		//s.useDelimiter("\\s*");
		System.out.println("Enter the string to be reversed:");
		String original ="";
		try
		{
			original = s.next();
		}
		catch(Exception e)
		{
			System.out.println("Default size is set as 5:"+e+"\n");
		}
		
		System.out.println("Reverse String is :");
					
		ReverseStr obj = new ReverseStr();
		obj.revMethod(original);
		s.close();
		
	}
	public void revMethod(String temp)
	{
		String reverse =  new StringBuffer(temp).reverse().toString();
		System.out.println(reverse);
		return;
		
	}
}
